import QtQuick 2.0
import QtQuick.Controls 1.0
import QtWebKit 3.0
Rectangle {
    id:root
    height: parent.height
    width: parent.width
  //  anchors.fill: parent
    color: "#252126"
    property alias  listview: listq
    property  int order
    property  string name
    signal enter()
    Menutil{
        id:menuBa
    }
    Rectangle{
        id:optionnal
        color: "#252126"
        anchors.bottom: parent.bottom
        anchors.margins: 10
        border.color: "white"; border.width: 10; radius: 5
        width: parent.width*5/6
        height: parent.height/4
        WebView {
            id: webView
            anchors.fill: parent
            smooth: false
            //            preferredHeight: parent.height
            //            preferredWidth: parent.width
            height: parent.height
            width: parent.width
            url: "file:///E:/HightChart/examples/line-time-series/index.htm"
        }
    }
    Rectangle {
        id:window
        anchors.top :menuBa.bottom
        //   anchors.margins: 15
        width: parent.width
        height: parent.height-(optionnal.height + menuBa.height+50)
        color: "black"

        Item{
            //   color:"white"
            id:datacol
            width: window.width/3
            height: window.height
            anchors {top:window.top; topMargin: 0; left: parent.left; }
            DigitalDisplay{
                id:rf
                txt: qsTr("RF12345678910")
                anchors {top:parent.top; topMargin: 10; left: parent.left; right: parent.right}



                height: datacol.height/3
            }
            DigitalDisplay{
                id:kg
                txt:qsTr("0.45 Kg.")
                anchors {top:rf.bottom; topMargin: 10; left: parent.left; right: parent.right}
                height: datacol.height/3
            }
            DigitalDisplay{
                id:bw
                txt:qsTr("0.45cm.")
                anchors.left: parent.left
                anchors.top: kg.bottom
                width: parent.width/2 -bw.anchors.margins*1.5
                height: datacol.height/3
            }
            DigitalDisplay{
                id:bh
                txt:qsTr("0.45cm.")
                anchors.right: parent.right
                anchors.top: kg.bottom
                width: parent.width/2 - bh.anchors.margins*1.5
                height: datacol.height/3
            }
        }
        Item{
            id:imagecol
            width: parent.width/2
            height: parent.height
            anchors {top:window.top; topMargin: 10; left: datacol.right;  }
            Rectangle {
                id:sp_image
                anchors.fill: parent
                anchors.rightMargin: 10
                //                anchors.verticalCenter: parent.verticalCenter
                //                anchors.horizontalCenter:  parent.horizontalCenter
                border.color: "white"; border.width: 10; radius: 5

                color: "blue"
                Image {
                    id:image
                    anchors.fill: parent
                    anchors.margins: 20
                    source:"image://a/q"
                }
                Text {
                    id: num
                    text: "Ready"
                    font.family: "Calibri "
                    font.bold: true// localFont.name
                    font.pointSize: 30
                    color: "#e0890e"
                    elide: Text.ElideMiddle
                    styleColor: "#fd0000"
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.horizontalCenter: parent.horizontalCenter
                    //opacity: flick.atYBeginning ? 0 : 1

                }
            }
        }
        Item{
            id:listcol
//            y:menuBa.height
//            x:optionnal.width
            anchors {top:root.top ;topMargin: 10; left: imagecol.right;right: window.right; bottom:root.bottom; bottomMargin: 10; }
            height: root.height -menuBa.height
         //   width: root.width-optionnal.width

            ListData2{
                id:listq
                w_details: root.width
                h_details: root.height
                m_details: menuBa.height
                anchors.fill: parent


            }

        }
    }
    //    Menutil{
    //        id:menuBa2
    //    }
}
